const postsModules=require('../albx_modules/postsModules')

module.exports={
    getAllCateList(req,res){
        console.log(req.query);
        n1=(req.query.pageNum-1)*req.query.pageSize;
        n2=req.query.pageSize
        postsModules.getAllCateList(n1,n2,(err,data)=>{
            if(err)return res.json({
                code:400,
                msg:'获取数据失败'
            })
            res.json({
                code:200,
                msg:'获取数据成功',
                data
            })
        })
    }
}